package com.bawei.module_goods.adapter

import android.widget.ImageView
import com.bawei.module_goods.R
import com.bawei.module_goods.entity.GoodsBanner
import com.bumptech.glide.Glide
import com.youth.banner.adapter.BannerImageAdapter
import com.youth.banner.holder.BannerImageHolder

class BannerAdapter(banners: List<GoodsBanner>) : BannerImageAdapter<GoodsBanner>(banners) {
    override fun onBindView(holder: BannerImageHolder?, data: GoodsBanner?, position: Int, size: Int) {
        holder?.let {
            Glide.with(it.itemView)
                .load(data?.imageUrl)
                .placeholder(R.drawable.bg_ad_placeholder)
                .into(it.imageView as ImageView)
        }
    }
} 